﻿using SwyishChess.Domain.Piece;

namespace SwyishChess.Service
{
    public interface ISpecialMoveService
    {
        /// <summary>
        /// Do actually promotion of a pawn
        /// </summary>
        /// <param name="chessPieces">Chess pieces array</param>
        /// <param name="type">Type the pawn is transforming to</param>
        /// <param name="cp">The pawn we are upgrading</param>
        /// <param name="owningPlayerID">The color of pawn</param>
        /// <returns>Upgraded chess piece</returns>
        ChessPiece DoPawnPromotion(ChessPiece[,] chessPieces, string type, ChessPiece cp, int owningPlayerID, out ChessPiece affectedPiece);
        /// <summary>
        /// Do the castling move
        /// </summary>
        /// <param name="cp">Chess piece</param>
        /// <param name="previousCol">previosu column</param>
        /// <param name="newCol">new column</param>
        /// <param name="affectedPiece">Affected chess piece reference </param>
        void DoCastling(ChessPiece[,] chessPieces, ChessPiece cp, int previousCol, int newCol, out ChessPiece affectedPiece);
        /// <summary>
        /// Do actually en passant
        /// </summary>
        /// <param name="chessPieces">Chess pieces array</param>
        /// <param name="cp">Chess piece doing the en passant</param>
        /// <param name="capturedPiece">Chess piece captured by en passant</param>
        void DoEnPassant(ChessPiece[,] chessPieces, ChessPiece cp, out ChessPiece capturedPiece);
    }
}
